﻿<el-drawer :title="isAdd?'添加角色':'编辑角色'" :visible.sync="showDrawer"
           direction="rtl"
           :before-close="handleClose"
           @@opened="handleOpened"
           size="50%">
    <div class="hx-4 hx-flex hx-flex-column hx-h-100">
        <el-form :model="form" ref="ruleForm" :rules="rules" status-icon
                 label-width="90px" class="hx-flex-fill">
            <el-form-item label="角色名称" prop="name">
                <el-input v-model="form.name" ></el-input>
            </el-form-item>
            <el-form-item label="描述" prop="description">
                <el-input v-model="form.description"></el-input>
            </el-form-item>
            <el-form-item label="序号" prop="orderSort">
                <el-input v-model.number="form.orderSort" type="number"></el-input>
            </el-form-item>
            <el-form-item label="状态" prop="enabled">
                <el-switch v-model="form.enabled" active-value="Y" inactive-value="N"></el-switch>
            </el-form-item>
        </el-form>
        <div class="hx-flex">
            <el-button class="hx-flex-fill" @@click="showDrawer = false">取 消</el-button>
            <el-button class="hx-flex-fill" type="primary" @@click="handleSubmit('ruleForm')" :loading="loading">{{ loading ? '提交中 ...' : '提 交' }}</el-button>
        </div>
    </div>
</el-drawer>

